x={1231,312,3452,245,234,245,3245,}
for i=1,#x do
	a=x[i]
	for j=i,#x do
		if(a<x[j]) then
			a=x[j] 
			index=j
		end
	end
x[index]=x[i]
x[i]=a
end

for i=1,#x do
	print('x[' .. i .. ']=' .. x[i])
end
